package ddbs;

import java.util.HashMap;
import java.util.Map;

public class WorkFactory {
    static Map<String, WorkCreater> contructers = new HashMap<String, WorkCreater>();

    static LocalWork creatWork(MSG msg) {
        return contructers.get(msg.status).fromMSG(msg);
    }

    static void registerCreater(String status, WorkCreater creater) {
        contructers.put(status, creater);
    }
}
